home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIXULWindow.idl < prev    next >
Text File  |  2006-05-08  |  5KB  |  142 lines

  1. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is the Mozilla browser.
  17.  *
  18.  * The Initial Developer of the Original Code is
  19.  * Netscape Communications, Inc.
  20.  * Portions created by the Initial Developer are Copyright (C) 1999
  21.  * the Initial Developer. All Rights Reserved.
  22.  *
  23.  * Contributor(s):
  24.  *   Travis Bogard <travis@netscape.com>
  25.  *
  26.  * Alternatively, the contents of this file may be used under the terms of
  27.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  28.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  29.  * in which case the provisions of the GPL or the LGPL are applicable instead
  30.  * of those above. If you wish to allow use of your version of this file only
  31.  * under the terms of either the GPL or the LGPL, and not to allow others to
  32.  * use your version of this file under the terms of the MPL, indicate your
  33.  * decision by deleting the provisions above and replace them with the notice
  34.  * and other provisions required by the GPL or the LGPL. If you do not delete
  35.  * the provisions above, a recipient may use your version of this file under
  36.  * the terms of any one of the MPL, the GPL or the LGPL.
  37.  *
  38.  * ***** END LICENSE BLOCK ***** */
  39.  
  40. #include "nsISupports.idl"
  41.  
  42. /**
  43.  * The nsIXULWindow
  44.  *
  45.  * When the window is destroyed, it will fire a "xul-window-destroyed"
  46.  * notification through the global observer service.
  47.  */
  48.  
  49. interface nsIDocShell;
  50. interface nsIDocShellTreeItem;
  51. interface nsIAppShell;
  52. interface nsIXULBrowserWindow;
  53.  
  54. [scriptable, uuid(b6c2f9e1-53a0-45f2-a2b8-fe37861fe8a8)]
  55. interface nsIXULWindow : nsISupports
  56. {
  57.   /**
  58.    * The docshell owning the XUL for this window.
  59.    */
  60.   readonly attribute nsIDocShell docShell;
  61.  
  62.   /**
  63.    * Indicates if this window is instrinsically sized.    
  64.    */
  65.   attribute boolean intrinsicallySized;
  66.  
  67.   /**
  68.    * The primary content shell.  
  69.    *
  70.    * Note that this is a docshell tree item and therefore can not be assured of
  71.    * what object it is. It could be an editor, a docshell, or a browser object.
  72.    * Or down the road any other object that supports being a DocShellTreeItem
  73.    * Query accordingly to determine the capabilities.
  74.    */
  75.   readonly attribute nsIDocShellTreeItem primaryContentShell;
  76.  
  77.   /**
  78.    * The content shell specified by the supplied id.
  79.    *
  80.    * Note that this is a docshell tree item and therefore can not be assured of
  81.    * what object it is.  It could be an editor, a docshell, or a browser object.
  82.    * Or down the road any other object that supports being a DocShellTreeItem
  83.    * Query accordingly to determine the capabilities.
  84.    */
  85.   nsIDocShellTreeItem getContentShellById(in wstring ID);
  86.  
  87.   /**
  88.    * Tell this window that it has picked up a child XUL window
  89.    * @param aChild the child window being added
  90.    */
  91.   void addChildWindow(in nsIXULWindow aChild);
  92.  
  93.   /**
  94.    * Tell this window that it has lost a child XUL window
  95.    * @param aChild the child window being removed
  96.    */
  97.   void removeChildWindow(in nsIXULWindow aChild);
  98.  
  99.   /**
  100.    * Move the window to a centered position.
  101.    * @param aRelative the window relative to which the window is moved.
  102.    *                  See screen parameter for details. if null, the
  103.    *                  window is centered relative to the main screen.
  104.    * @param aScreen   PR_TRUE to center the window relative to the screen
  105.    *                  containing aRelative. PR_FALSE to center it relative
  106.    *                  to aRelative itself.
  107.    * @param aAlert    PR_TRUE to move the window to an alert position,
  108.    *                  generally centered horizontally and 1/3 down from the top.
  109.    */
  110.   void center(in nsIXULWindow aRelative, in boolean aScreen, in boolean aAlert);
  111.  
  112.   /**
  113.    * Shows the window as a modal window. That is, ensures that it is visible
  114.    * and runs a local event loop, exiting only once the window has been closed.
  115.    */
  116.   void showModal();
  117.  
  118.   const unsigned long lowestZ = 0;
  119.   const unsigned long loweredZ = 4;  /* "alwaysLowered" attribute */
  120.   const unsigned long normalZ = 5;
  121.   const unsigned long raisedZ = 6;   /* "alwaysRaised" attribute */
  122.   const unsigned long highestZ = 9;
  123.  
  124.   attribute unsigned long zLevel;
  125.  
  126.   /**
  127.    * contextFlags are from nsIWindowCreator2
  128.    */
  129.   attribute PRUint32 contextFlags;
  130.  
  131.   attribute PRUint32 chromeFlags;
  132.   /**
  133.    * Create a new window.
  134.    * @param aChromeFlags see nsIWebBrowserChrome
  135.    * @return the newly minted window
  136.    */
  137.   nsIXULWindow createNewWindow(in PRInt32 aChromeFlags,
  138.                                in nsIAppShell aAppShell);
  139.  
  140.   attribute nsIXULBrowserWindow XULBrowserWindow;
  141. };
  142.